<?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('base/common-header', TEMPLATE_INCLUDEPATH)) : (include template('base/common-header', TEMPLATE_INCLUDEPATH));?>

<div class="btn-group" role="group" aria-label="...">
</div>

<a <?php  if($_GET['user_name']=='') { ?> class="btn btn-success" <?php  } else { ?> class="btn btn-warning" <?php  } ?> href="<?php  echo aurl('showUser',['user_name'=>'','act_id'=>$_GET['act_id']])?>" target="self">所有</a>
<a <?php  if($_GET['user_name']=='group') { ?> class="btn btn-success" <?php  } else { ?> class="btn btn-warning" <?php  } ?> href="<?php  echo aurl('showUser',['user_name'=>'group','act_id'=>$_GET['act_id']])?>" target="self">团购</a>
<a <?php  if($_GET['user_name']=='personal') { ?> class="btn btn-success" <?php  } else { ?> class="btn btn-warning" <?php  } ?> href="<?php  echo aurl('showUser',['user_name'=>'personal','act_id'=>$_GET['act_id']])?>" target="self">单独购买</a>

<form action="<?php  echo aurl('showUser')?>" id="form_search" name="form-search" class="table-top-search form-inline" style="float: right" method="GET" data-search-ignore="page">
    
    

    <input type="text" name="baby_name" class="form-control" value="<?php  echo $_GET['baby_name'];?>" placeholder="搜索用户名字">
    <!-- <select name="user_name">
        <option value="" <?php  if($_GET['user_name'] == '') { ?>selected="selected"<?php  } ?>>
            请选择
        </option>
        <option value="personal" <?php  if($_GET['user_name']=='personal') { ?>selected="selected"<?php  } ?>>
            单独购买
        </option>
        <option value="group" <?php  if($_GET['user_name']=='group') { ?>selected="selected"<?php  } ?>>
            团购
        </option>
    </select> -->
    <?php  echo tpl_form_field_daterange('cav_time',$_GET['cav_time'])?>
    <button class="btn btn-warning">搜索</button>&emsp;
    <a class="btn btn-success" style="float:right" href="<?php  echo aurl('exportExcel',['act_id' => $act_id, 'cav_time'=>$_GET['cav_time'],'user_name'=>$_GET['user_name'],'baby_name'=>$_GET['baby_name']])?>" target="self">导出数据</a>
</form>



<form action="javascript:void(0)" method="POST" id="form">
    <table class="table table-hover">
        <thead>
            <tr>
                <th width=28%>订单信息</th>
                <th>支付金额</th>
                <th>用户信息</th>
                <th>拼团信息</th>
                <th>支付状态</th>
            </tr>
        </thead>
        <tbody>
            <?php  if(is_array($userlist)) { foreach($userlist as $item) { ?>
            <tr>
                <td>
                    <div>
                        订单编号：<?php  echo $item['order_sn'];?><br>
                    </div>
                    <div>
                        微信流水：<?php  echo $item['transaction_id'];?><br>
                    </div>
                    
                    <div>
                        下单时间：<?php  echo $item['create_time'];?>
                    </div>
                    <div>
                        支付完成时间：<?php  echo $item['com_time'];?>
                    </div>
                </td>
                <td>
                    <?php  echo $item['price'];?>&nbsp;元<br>
                </td>
                <td>
                    <div>
                        用户昵称：<?php  echo userinfo($item['openid'])['nickname']?>
                    </div>
                    <div>
                        联系方式：<?php  echo $item['mobile'];?>
                    </div>
                    <div>
                        用户名字：<?php  echo $item['baby_name'];?>
                    </div>
                    <div>
                        报名类型：<?php  echo $_W['NS']['join_type'][$item['join_type']];?>&emsp;
                    </div>
                </td>
                <td>
                    <?php  if(!empty($item['share_openid'])) { ?>
                        <div>
                            团长：<?php  echo userinfo($item['share_openid'])['nickname']?>
                        </div>
                    <?php  } ?>
                    <div>
                        拼团角色：<?php  echo $item['role'];?>
                    </div>
                    <div>
                        拼团需要人数：<?php  echo $item['sum_group'];?>&nbsp;人
                    </div>
                    <div>
                        拼团实际人数：<?php  echo $item['group_num'];?>&nbsp;人
                    </div>
                    <div>
                        拼团状态：<?php  echo $item['result'];?>
                    </div>
                </td>
                <td>
                    <?php  echo $_W['NS']['pay_status'][$item['pay_status']];?>&emsp;
                </td>
                
            </tr>
            <?php  } } ?>
        </tbody>
    </table>
    <?php  if(empty($userlist)) { ?> <p class="text-center">暂无数据</p> <?php  } ?>
    <?php  echo $page;?>
</form>

<?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('base/common-footer', TEMPLATE_INCLUDEPATH)) : (include template('base/common-footer', TEMPLATE_INCLUDEPATH));?>